package com.hb;

import cn.hutool.core.util.CharsetUtil;
import cn.hutool.crypto.symmetric.SymmetricAlgorithm;
import cn.hutool.crypto.symmetric.SymmetricCrypto;

/**
 * @author hubin
 * @description
 * @createTime 2024/3/5 14:29
 */
public class AesCryptoUtil {

    public static String encryptDefault(String content, String keyStr) {
        byte[] key = keyStr.getBytes();
        SymmetricCrypto aes = new SymmetricCrypto(SymmetricAlgorithm.AES, key);
        return aes.encryptBase64(content);
    }
}
